home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
keystuff.arc
/
KYSTFDEM.C
< prev
next >
Wrap
Text File
|
1990-01-08
|
778b
|
48 lines
void keystuff(char *cmd)
{register unsigned a=0;
register unsigned x=0;
pokeb(0,0x41a,0x001e);
pokeb(0,0x41c,0x001e);
while (cmd[a])
{
poke(0,0x41e+a*2,cmd[a]);
a++;
}
pokeb(0,0x41a,0x001e);
pokeb(0,0x41c,0x001e+a*2);
}
main(int argc, char *argv[])
{int totargs = 1;
int argchars = 0;
int totchars = 0;
char cmd[17];
char c[20];
while((totargs<argc) & (totchars < 15))
{
argchars=0;
while((totchars <15) & (argv[totargs][argchars]!=0))
{
if(argv[totargs][argchars]=='~') cmd[totchars]=13;
else cmd[totchars] = argv[totargs][argchars];
totchars++;
argchars++;
}
cmd[totchars]=' ';
totchars++;
totargs++;
}
cmd[totchars-1]=0;
keystuff(cmd);
}